<?php

include '../../configs/global.php';
$data = $_POST;
$cname = $data['cname'];
$credit = $data['credit'];
$info=$data['info'];
$id=$data['id'];


$sql = "UPDATE curriculum SET cname='$cname',credit='$credit',info='$info' where id='$id'";
// echo $sql;
$r1 = $pdo->exec($sql);
if ($r1) {
    header('location:/study/style/skip.php?url=admin/showcurriculum.php&info=修改成功！');
} else {
    header('location:/study/style/skip.php?url=admin/showcurriculum.php&info=修改失败,请稍后再试！');
}
// echo json_encode($ajax_res);
